import { createApp } from 'vue'
import App from './App.vue'

// 导入pinia
import { createPinia } from 'pinia'
// 导入router
import router from './router'
// 导入ElementPlus全部组件
import ElementPlus from "element-plus"
// 导入ElementPlus样式及其覆盖样式
import "element-plus/dist/index.css"
import "./styles/setting.scss"
// 导入富文本编辑器组件
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
// 按需导入ElementPlus 图标组件
import {
    User, 
    Lock, 
    Document, 
    Histogram, 
    SwitchButton, 
    ArrowRight, 
    Plus, 
    Edit, 
    View, 
    Delete
} from '@element-plus/icons-vue'

// 创建app
const app = createApp(App)

// const globalOptions = {
//     modules: {
//       toolbar: ['bold', 'italic', 'underline']
//     },
//     placeholder: '请添加内容',
//     readOnly: true,
//     theme: 'snow'
// }
// QuillEditor.props.globalOptions.default = () => globalOptions

// 注册
// -- 注册pinia
app.use(createPinia())
// -- 注册router
app.use(router)
// -- 注册ElementPlus
app.use(ElementPlus)
// -- 注册图标组件
app.component(User.name, User)
app.component(Lock.name, Lock)
app.component(Document.name, Document)
app.component(Histogram.name, Histogram)
app.component(SwitchButton.name, SwitchButton)
app.component(ArrowRight.name, ArrowRight)
app.component(Plus.name, Plus)
app.component(Edit.name, Edit)
app.component(View.name, View)
app.component(Delete.name, Delete)
//  -- 注册富文本编辑器组件
app.component("QuillEditor", QuillEditor)

app.mount('#app')
